// import Item from './components/Item';

import Main from '@/components/main';
import { getUserFromCookie } from '@/lib/auth';
import { redirect } from 'next/navigation';

// export default function Home() {
// 	return (
// 		<div className="x">
// 			{list.map((item, i) => {
// 				return <Item {...item} key={i}></Item>;
// 			})}
// 		</div>
// 	);
// }

export default async function HomePage() {
	const user = await getUserFromCookie();
	console.log('User:', user);
	if (!user) redirect('/login');
	// if (!user.roles.includes('admin')) redirect('/403');

	return (
		<div className="h-screen w-screen">
			<Main></Main>
		</div>
	);
}
